package com.server.server_a10.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.server.server_a10.entity.lightingSystem.Light;
import com.server.server_a10.entity.securitySystem.Door;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

@Mapper
public interface DoorMapper extends BaseMapper<Door> {

    @SelectProvider(type = DoorMapper.ProviderDoor.class, method = "getHomeByUserId")
    List<Door> getDoorByHomeId(int home_id);

    class ProviderDoor {
        public static String getHomeByUserId() {
            return "select * from door where home_id=#{home_id}";
        }
    }
}
